package vip.xiaonuo.smzq.modular.lifecycle.vo;

import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import vip.xiaonuo.smzq.modular.lifecycle.base.Dictionary;

/**
 * 字典vo类
 */
@Data
public class MineTypeVO extends Dictionary {

    @ApiModelProperty(value="矿石类型单位")
    private String unit;

    @ApiModelProperty(value="金属量单位")
    private String jsldw;

    @ApiModelProperty(value="矿石量单位")
    private String ksldw;

    @ApiModelProperty(value="统计对象")
    private Double tjdx;

    @ApiModelProperty(value="矿产类别")
    private String kclb;

    @ApiModelProperty(value="金属名称")
    private String jsdxmc;

    @ApiModelProperty(value="矿产代码")
    private Integer kcdm;
    @ApiModelProperty(value="矿产名称")
    private String kcmc;

    public void initField(){
        if(StrUtil.isNotBlank(this.getJsdxmc())){
            super.setName(StrUtil.format("{}[{}]",this.getKcmc(),this.getJsdxmc()));
//            super.setName(this.getJsdxmc());
        }else{
            super.setName(this.getKcmc());
        }
    }

}
